home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
rayshade
/
libray
/
libimage
/
Makefile.SH
< prev
Wrap
Makefile
|
1994-08-01
|
2KB
|
62 lines
case $CONFIG in
'')
if test ! -f config.sh; then
ln ../config.sh . || \
ln ../../config.sh . || \
ln ../../../config.sh . || \
(echo "Can't find config.sh."; exit 1)
fi
. config.sh
;;
esac
: This forces SH files to create target in same directory as SH file.
: This is so that make depend always knows where to find SH derivatives.
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
echo "Extracting libimage/Makefile (with variable substitutions)"
: This section of the file will have variable substitutions done on it.
: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
: Protect any dollar signs and backticks that you do not want interpreted
: by putting a backslash in front. You may delete these comments.
$spitshell >Makefile <<!GROK!THIS!
OPTIMIZE = $optimize
CCFLAGS = $ccflags $large
RANLIB = $ranlib
CC = $cc
MKDEP = $mkdep
URTINC = $urtinc
!GROK!THIS!
: In the following dollars and backticks do not need the extra backslash.
$spitshell >>Makefile <<'!NO!SUBS!'
LIB = ../libray.a
INCLUDE = -I.. -I../.. $(URTINC)
CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
SHELL = /bin/sh
OFILES = image.o
CFILES = image.c
$(LIB): $(OFILES)
ar cur $(LIB) $(OFILES)
$(RANLIB) $(LIB)
clean:
rm -f $(OFILES)
depend:
(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
$(MKDEP) $(CFILES) | sed 's/: \.\//: /; /\/usr\/include/d' \
) >Makefile.new
cp Makefile Makefile.bak
cp Makefile.new Makefile
rm -f Makefile.new
# DO NOT DELETE THIS LINE
!NO!SUBS!
chmod 755 Makefile
$eunicefix Makefile